import { defineStore } from 'pinia'

const useScreenStore = defineStore('screen', {
    state: () => ({
        screenWidth: window.innerWidth,
        isXs: window.innerWidth < 768,
        statusValue: 'success成功',
    }),
    actions: {
        handleResize() {
            this.state.screenWidth = window.innerWidth
            this.state.isXs = window.innerWidth < 768
        },
    },
})

export default useScreenStore
